//
//  DYJQJingdianInfoCell.swift
//  SheYangBigData
//
//  Created by 叁拾叁 on 2021/2/5.
//  Copyright © 2021 叁拾叁. All rights reserved.
//


import UIKit
import YYText
import SwiftWeb

class DYJQJingdianInfoCell: SYBaseCell {

    var bgView: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = .white
        v.layer.cornerRadius = 5
        v.layer.masksToBounds = true
        return v
    }()
    
    let jingdian: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x333333)
        v.font = 18.autoBoldFontSize()
        v.text  = "景点信息"
        return v
    }()
    
    
    
    let shijianT: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x999999)
        v.font = 15.autoFontSize()
        v.text = "游玩时间"
        return v
    }()
    
    let phoneT: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x999999)
        v.font = 15.autoFontSize()
        v.text = "景区电话"
        return v
    }()
    
    let dizhiT: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x999999)
        v.font = 15.autoFontSize()
        v.text = "景区地址"
        return v
    }()
 
    
    
    
    let shijian: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x333333)
        v.font = 15.autoFontSize()
        v.text = "08:00-18:00"
        return v
    }()
    
    let phone: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x333333)
        v.font = 15.autoFontSize()
        v.text = "025-33018998"
        return v
    }()
    
    let dizhi: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x333333)
        v.font = 15.autoFontSize()
        v.numberOfLines = 0
        v.text = "南京市六合区龙池街道环龙池路北侧"
        return v
    }()
    
    let labelFir: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x5D99FB)
        v.font = 13.autoFontSize()
        v.text = "  拨号  "
        v.backgroundColor = UIColor(hex: 0xECF2FD)
        v.layer.cornerRadius = 3.autoWidth()
        v.isUserInteractionEnabled = true
        return v
    }()
    let labelSec: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x5D99FB)
        v.font = 13.autoFontSize()
        v.text = "  导航  "
        v.backgroundColor = UIColor(hex: 0xECF2FD)
        v.layer.cornerRadius = 3.autoWidth()
        v.isUserInteractionEnabled = true
        return v
    }()
    
    var fir: UIButton = {
        let v = UIButton()
        return v
    }()
    
    var sec: UIButton = {
        let v = UIButton()
        return v
    }()
    
    
    func configure(_ model: RYDingdanModel) {
        
    }

    override func initViews() {
        
        fir.addAction {[weak self] in
            if let `self` = self {
                Tool().callSomeOne("18262385789")
            }
        }
        
        sec.addAction {[weak self] in
            if let `self` = self {
                
            }
        }
        
        self.backgroundColor = .clear
            contentView.addSubview(bgView)
        bgView.addSubview(jingdian)
        
        bgView.addSubview(shijian)
        
        bgView.addSubview(shijianT)
        bgView.addSubview(phoneT)
        bgView.addSubview(phone)
        bgView.addSubview(dizhi)
        bgView.addSubview(dizhiT)
        bgView.addSubview(labelFir)
        bgView.addSubview(labelSec)
        bgView.addSubview(fir)
        bgView.addSubview(sec)
        
        jingdian.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(20.autoWidth())
            make.left.equalToSuperview().offset(10.autoWidth())
            make.height.equalTo(18.autoWidth())
        }
        shijian.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(52.autoWidth())
            make.left.equalToSuperview().offset(95.autoWidth())
            make.height.equalTo(15.autoWidth())
        }
        shijianT.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(52.autoWidth())
            make.left.equalToSuperview().offset(10.autoWidth())
            make.height.equalTo(15.autoWidth())
        }
        phoneT.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(82.autoWidth())
            make.left.equalToSuperview().offset(10.autoWidth())
            make.height.equalTo(15.autoWidth())
        }
        phone.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(82.autoWidth())
            make.left.equalToSuperview().offset(95.autoWidth())
            make.height.equalTo(15.autoWidth())
        }
        dizhi.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(112.autoWidth())
            make.left.equalToSuperview().offset(95.autoWidth())
            make.right.equalToSuperview().offset(-67.autoWidth())
            make.bottom.equalToSuperview().offset(-15.autoWidth())
        }
        dizhiT.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(112.autoWidth())
            make.left.equalToSuperview().offset(10.autoWidth())
            make.height.equalTo(15.autoWidth())
        }
        labelFir.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(77.autoWidth())
            make.right.equalToSuperview().offset(-10.autoWidth())
            make.height.equalTo(18.autoWidth())
        }
        labelSec.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(114.autoWidth())
            make.right.equalToSuperview().offset(-10.autoWidth())
            make.height.equalTo(18.autoWidth())
        }
        fir.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(67.autoWidth())
            make.right.equalToSuperview()
            make.height.equalTo(48.autoWidth())
            make.width.equalTo(58.autoWidth())
        }
        sec.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(104.autoWidth())
            make.right.equalToSuperview()
            make.height.equalTo(48.autoWidth())
            make.width.equalTo(58.autoWidth())
        }
        
        bgView.snp.makeConstraints { (make) in
            make.top.equalToSuperview()
            make.bottom.equalToSuperview().offset(-10.autoWidth())
            make.left.equalToSuperview()
            make.right.equalToSuperview()
        }
    }
}
